package com.dq.demo.ui.activity;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.dq.demo.util.SystemUtil;
import com.dq.wallpaper.R;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Author:ZJC
 * Date:2020/2/7  15:55
 * Description:AboutActivity
 */
public class AboutActivity extends BaseActivity {

    @BindView(R.id.title)
    public RelativeLayout layoutTitle;
    @BindView(R.id.img_back)
    public ImageView imgBack;
    @BindView(R.id.tv_title)
    public TextView tvTitle;
    @BindView(R.id.tv_version)
    public TextView tvVersion;
    @BindView(R.id.img_icon)
    public ImageView imgIcon;
    @BindView(R.id.img_title)
    ImageView imgTitle;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_about);
        ButterKnife.bind(this);
        initView();
        initData();
    }

    public void initView() {
        layoutTitle.setPadding(0, this.height, 0, 0);
    }

    @Override
    public void initData() {
        tvTitle.setText("关于");
        Glide.with(this).load(R.mipmap.icon_logo).into(imgIcon);
        tvVersion.setText(tvVersion.getText().toString() + "\tV" + SystemUtil.getVersionName());
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
    }

    @OnClick(R.id.img_back)
    public void onViewClicked() {
        finish();
    }
}